package com.itbaizhan.openhis.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itbaizhan.openhis.domain.CareHistory;
import com.itbaizhan.openhis.domain.CareOrder;
import com.itbaizhan.openhis.domain.CareOrderItem;
import com.itbaizhan.openhis.dto.CareHistoryDto;
import com.itbaizhan.openhis.dto.CareOrderFormDto;

import java.util.List;

/**
 *
 */
public interface CareHistoryService extends IService<CareHistory> {

    /**
     * 根据病历id查询病历
     * @param patientId
     * @return
     */
    List<CareHistory> queryCareHistoryByPatientId(String patientId);

    /**
     * 根据处方id查询处方
     * @param chId
     * @return
     */
    List<CareOrder> queryCareOrdersByChId(String chId);

    /**
     * 根据处方id 查询处方详情
     * @param coId
     * @return
     */
    List<CareOrderItem> queryCareOrderItemsByCoId(String coId,String detailStatus);

    CareHistory saveOrUpdateCareHistory(CareHistoryDto careHistoryDto);

    CareHistory queryCareHistoryByRegId(String regId);

    CareHistory queryCareHistoryByChId(String chId);

    int saveCareOrderItem(CareOrderFormDto careOrderFormDto);

    CareOrderItem queryCareOrderItemsByItem(String itemId);

    int deleteCareOrderItemById(String itemId);

    int visitComplete(String regId);

    String doMedicine(List<String> itemIds);

    List<CareOrderItem> queryCareOrderItemsByStatus(String coTypeCheck, String status);

    CareOrder queryCareOrderByCoId(String coId);
}
